from django.urls import re_path
from . import views
#
urlpatterns = [
    # GET /orders/settlement/   # 完成
    re_path(r'^orders/settlement/$',views.OrderSettleView.as_view()),

    # POST /orders/ # 完成  未保存到数据库
    # GET /orders/  # 完成
    re_path(r'^orders/$', views.OrderCommitView.as_view(
        {'get': 'list',
        'post': 'create',}
    )),

    # GET /orders/(?P<order_id>\d+)/payment/    # 完成，还没有测试登录状态
    re_path(r'^orders/(?P<order_id>\d+)/payment/$', views.AlipayView.as_view()),

    #1. https://excashier.alipaydev.com/standard/auth.htm?payOrderId=9f8279e0a0184c8eb10a167727568841.00
    #2. https://cashier.alipaydev.com/standard/lightpay/lightPayCashier.htm?orderId=07067790ed8b0148280000-2-2NN6834&bizIdentity=trade20001&outBizNo=2020070622001426830502782338&timeStamp=1594017996383&country=CN
    #3. https://cashier.alipaydev.com/home/error.htm?orderId=07067790ed8b0148280000-2-2NN6834&errorCode=SYSTEM_EXCEPTION

    # PUT /payment/status/?<支付结果数据>     #
    re_path(r'^payment/status/?$', views.PaymentView.as_view()),

    # GET /orders/(?P<order_id>\d+)/uncommentgoods/     #完成
    re_path(r'^orders/(?P<order_id>\d+)/uncommentgoods/$', views.UnCommentGoodsView.as_view()),


    # POST /orders/(?P<order_id>\d+)/comments/  # 完成
    re_path(r'^orders/(?P<order_id>\d+)/comments/$', views.CommentGoodsView.as_view()),

]